#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>


typedef char BTDataType;

typedef struct BinaryTreeNode
{
	BTDataType data;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;

BTNode* BinaryTreeCreate(BTDataType* a, int n, int* p);

void BinaryTreeDestory(BTNode** root);

int BinaryTreeSize(BTNode* root);

int BinaryTreeLeafSize(BTNode* root);

int BinaryTreeLevelKSize(BTNode* root, int k);

BTNode* BinaryTreeFind(BTNode* root, BTDataType x);

void BinaryTreePrevOrder(BTNode* root);

void BinaryTreeInOrder(BTNode* root);

void BinaryTreePostOrder(BTNode* root);

void BinaryTreeLevelOrder(BTNode* root);

bool BinaryTreeComplete(BTNode* root);


